/*
 * ears.h
 *
 *  Created on: Nov 26, 2012
 *      Author: michiel
 */

#ifndef EARS_MODEL_H_
#define EARS_MODEL_H_

#include "model_connector.h"
#include "comm/ears_msg.h"

class EarsModel : public ModelConnector {
	private:
		bool _done;
	protected:
		int lposition_;
		int rposition_;
		float langle_;
		float rangle_;

		int lflapper_;
		int rflapper_;
	public:
		EarsModel() : ModelConnector() {
			_done			= true;
			langle_		= 0.0;
			rangle_		= 0.0;
			rposition_	= 0;
			lposition_	= 0;

			lflapper_ = 1;
			rflapper_ = 1;
		}
		~EarsModel() {}
		void init();
		void spin();
		void prepState();
		void handlerCallback(const comm::ears::ConstPtr &msg);
		void moveEars();
};




#endif /* EARS_MODEL_H_ */
